<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	request.setCharacterEncoding("UTF-8");
	String cp = request.getContextPath(); 
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="<%=cp%>/data/css/common.css" rel="stylesheet" type="text/css" />
<link href="<%=cp%>/member/css/style.css" rel="stylesheet" type="text/css" />
<link href="<%=cp%>/tour/css/style1.css" rel="stylesheet" type="text/css" />
<link href="<%=cp%>/member/css/board.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=cp%>/data/js/jquery-1.8.2.js"></script>
<script type="text/javascript"> 
	function listChkDel(){
		// 체크 박스 모두 체크 
	}
	
	$(document).ready(function() {
		
		// 체크 박스 모두 체크
		  $("#checkAll").click(function() {
			

				$("input[name=cartNo]:checkbox").each(function() {
					$(this).attr("checked", true);
				});		


/* 
				$("input[name=cartNo]:checked").each(function() {
					$(this).attr("checked", false);
				}); */

		  });
/*
		   // 체크 박스 모두 해제
		  $("#uncheckAll").click(function() {
		   $("input[name=box]:checkbox").each(function() {
		    $(this).attr("checked", false);
		   });
		  });
*/		  

		  // 체크 되어 있는 값 추출
		  $("#deleteCheck").click(function() {
/* 			cnt = $("input[name=box]:checked").length;
			alert(cnt);
			
			var test = new Array(cnt);
			i = 0;
		   $("input[name=box]:checked").each(function() {
			
			test[i] = $(this).val();
			
			alert(test[i]);		
			i= i+1;
		   }); */
		   
		   f = document.form1;
		   f.action = "<%=cp%>/member/cartDel.action";
		   f.submit();
		   
		  });
/*
		  // 서버에서 받아온 데이터 체크하기 (콤마로 받아온 경우)
		  $("#updateChecked").click(function() {
		   var splitCode = $("#splitCode").val().split(",");
		   for (var idx in splitCode) {
		    $("input[name=box][value=" + splitCode[idx] + "]").attr("checked", true);
		   }
		  }); */

/* 		  // test case
		  test1(); */

		 });
</script>
</head>
<body>
<!-- Container -->
	<div id="container">
    
		<!-- Sub Navigation -->
		<div id="subNavigation">
			<h2><img src="<%=cp%>/member/image/h2_mypage.gif" alt="마이페이지" /></h2>
			<ul class="leftMenu">
                <li><a href='<%=cp%>/member/myMenu1.action'><img src='<%=cp%>/member/image/subnavi_mypage1.gif' alt='맞춤형 여행상품' /></a></li>
                <li><a href='<%=cp%>/member/myMenu2.action'><img src='<%=cp%>/member/image/subnavi_mypage2.gif' alt='예약상황' /></a></li>
                <li><a href='<%=cp%>/member/myMenu3.action'><img src='<%=cp%>/member/image/subnavi_mypage3.gif' alt='관심상품' /></a></li>
                <li><a href='<%=cp%>/member/myMenu4.action'><img src='<%=cp%>/member/image/subnavi_mypage4.gif' alt='참여현황' /></a></li>
                <li><a href='<%=cp%>/member/updated.action'><img src='<%=cp%>/member/image/subnavi_mypage5.gif' alt='정보관리' /></a></li>
                <li><a href='<%=cp%>/member/myMenu6.action'><img src='<%=cp%>/member/image/subnavi_mypage6.gif' alt='할인쿠폰' /></a></li>
                <li><a href='<%=cp%>/member/myMenu7.action'><img src='<%=cp%>/member/image/subnavi_mypage7.gif' alt='여행안내서 신청' /></a></li>
			</ul>
			
			
			<div class="banner_member"><a href="http://privacy.kisa.or.kr/event/" target="_blank"><img src="<%=cp%>/member/image/banner_member_01.gif" alt="개인정보 유출은 이제그만" /></a></div>
 
		</div>
		<!-- Sub Navigation //-->
 

    <form name="form1" id="form1" method="post" action="InterestProduct">
    <!-- Contents -->
    <div id="contents">
        <!-- 타이틀 로케이션 -->
        <div class="titleArea">
            <h3>
                <img src="<%=cp%>/member/image/mypage/h3_interest_goods.gif" alt="마이페이지" /><span class="visualImg"><img
                    src="<%=cp%>/member/image/mypage/img_visual.gif" alt="비주얼이미지" /></span></h3>
            <div class="location">
                <a href="#">
                   <a href="<%=cp%>/main.action"><img src="<%=cp%>/member/image/icon_home.gif" alt="홈" /></a> &gt; <a href="#">마이페이지</a>
                &gt; <a href="#">관심상품</a>
            </div>
        </div>
        <!-- 타이틀 로케이션 // -->
        <div>
            <img alt="관심상품으로 등록된 상품정보입니다. 상품을 비교하시려면 상품비교박스에 체크하신 후 상품비교 버튼을 누르시고 원하시는 상품을 비교 하실수 있습니다. 상품은 3개까지 비교하실 수 있습니다."
                src="<%=cp%>/member/image/mypage/text_interest_goods.gif" /></div>
        <!-- 선택,삭제 -->
        <div class="btnType4">
            <img src="<%=cp%>/member/image/mypage/btn_all_select.gif" alt="전체선택" style="cursor: pointer;" id="checkAll" />
            <img src="<%=cp%>/member/image/mypage/btn_choose_delete.gif" alt="선택삭제"
                style="cursor: pointer;" id="deleteCheck" />
        </div>
        <!-- 선택,삭제 -->
        <table cellpadding="0" cellspacing="0" class="tbListType1" summary="관심상품" width="100%">
            <caption>
                관심상품 리스트</caption>
            <colgroup>
                <col width="5%" />
                <col width="*" />
                <col width="14%" />
                <col width="22%" />
            </colgroup>
            <thead>
                <tr>
                    <th><img src="<%=cp%>/member/image/mypage/th_select.gif" alt="선택" /></th>
                    <th><img src="<%=cp%>/member/image/mypage/th_goods_name.gif" alt="상품명" /></th>
                    <th><img src="<%=cp%>/member/image/mypage/th_price.gif" alt="가격" /></th>
                    <th><img src="<%=cp%>/member/image/mypage/th_note.gif" alt="비고" /></th>
                </tr>
            </thead>
            <tbody id="listTbody">
            	
            	<c:if test="${cart != null}">
            	<c:forEach var="cart" items="${cart}">
            	<tr>
            		<td><input type="checkbox" name="cartNo" value="${cart.cartNo}"/></td>
            		<td>${cart.subject}</td>
            		<td>${cart.price}</td>
            		<td></td>
            	</tr>
            	</c:forEach>
                </c:if>
                <c:if test="${cart == null}">
                <tr id="ctl00_MAINCONTENT_trEmptyData">
				<td colspan="4" style="height: 150px;"> 등록된 내용이 없습니다.</td>
				</tr>
 				</c:if>
            </tbody>
        </table>
<%--         <!-- Paging -->
        <div class="pageNotice">
            <p class="page">
                <b>1</b> 페이지 / 총 <b>1</b> 페이지</p>
            <div class="paging">
                 &nbsp;<a href="javascript:ActionPaging(1,0);" title="1페이지로 이동 [현재페이지]" class='on'><font color='#FFFFFF'>1</font></a>
            </div>
        </div>
        <!-- Paging //-->
        <div class="searchBox">
            <select class="type_select2" id="SearchType" name="SearchType">
                <option value="PKGDES" selected>상품명</option>
                <option value="A.PKGPNH" >상품코드</option>
            </select>
            <input type="text" class="type_text2" id="SearchValue" name="SearchValue" value=""
                onkeydown="if(event.keyCode==13) fnSearch();" />
            <img src="<%=cp%>/member/image/mypage/btn_search.gif" alt="검색" onclick="fnSearch();" style="cursor: pointer;" />
        </div> --%>
    </div>
    
    <div style="visibility: hidden">
        <input type="hidden" id="Page" name="Page" value="1" />
        <input type="hidden" id="DelChk" name="DelChk" value="" />
    </div>
    <!-- Contents //-->
    
    </form>
 
		
	</div>
	<!-- Container //-->

</body>
</html>